/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author mehdi
 */
@Entity
public class Trainer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long Trid;
   private String Natr;
   
   private String Fntr;
  
   private int Potr;
   
   private String Adtr;
   
   private String Cotr;
  
   private String Citr;
   
   private String Letr;
   
   private String Ditr;
   
   @OneToOne
   private  Account account;
   @OneToMany(mappedBy="train")
   private List<Module> module;
   private String Dbtr;

    public Trainer() {
    }
   
   
   
    public Long getId() {
        return Trid;
    }

    public void setId(Long id) {
        this.Trid = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (Trid != null ? Trid.hashCode() : 0);
        return hash;
    }

    public String getAdtr() {
        return Adtr;
    }

    public void setAdtr(String Adtr) {
        this.Adtr = Adtr;
    }

    public String getCitr() {
        return Citr;
    }

    public void setCitr(String Citr) {
        this.Citr = Citr;
    }

    public String getCotr() {
        return Cotr;
    }

    public void setCotr(String Cotr) {
        this.Cotr = Cotr;
    }

    public String getDbtr() {
        return Dbtr;
    }

    public void setDbtr(String Dbtr) {
        this.Dbtr = Dbtr;
    }

    public String getDitr() {
        return Ditr;
    }

    public void setDitr(String Ditr) {
        this.Ditr = Ditr;
    }

    public String getFntr() {
        return Fntr;
    }

    public void setFntr(String Fntr) {
        this.Fntr = Fntr;
    }

    public String getLetr() {
        return Letr;
    }

    public void setLetr(String Letr) {
        this.Letr = Letr;
    }

    public String getNatr() {
        return Natr;
    }

    public void setNatr(String Natr) {
        this.Natr = Natr;
    }

    public int getPotr() {
        return Potr;
    }

    public void setPotr(int Potr) {
        this.Potr = Potr;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

  
    public List<Module> getModule() {
        return module;
    }

    public void setModule(List<Module> module) {
        this.module = module;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Trainer)) {
            return false;
        }
        Trainer other = (Trainer) object;
        if ((this.Trid == null && other.Trid != null) || (this.Trid != null && !this.Trid.equals(other.Trid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Trainer[ id=" + Trid + " ]";
    }
    
}
